package com.assessment.util;

import com.assessment.entity.FirstPhase;

/**
 * 计算第一阶段的总成绩
 * @author Administrator
 *
 */
public class Grade1Total {
	
	public void grade1Total(FirstPhase firstPhase){
		double total=0;
		if(firstPhase.getGaikuang()==1){
			total=total+3;}
		if(firstPhase.getOa()==1){
			total=total+3;}
		if(firstPhase.getDayin()==1){
			total=total+3;
		}if(firstPhase.getCuozhe()==1){
			total=total+3;
		}if(firstPhase.getLiyi()==1){
			total=total+3;
		}if(firstPhase.getZhuanbian()==1){
			total=total+3;
		}if(firstPhase.getIso9001()>=60){
			total=total+3;
		}if(firstPhase.getIso27001()>=60){
			total=total+3;
		}if(firstPhase.getAnquan()>=60){
			total=total+3;
		}if(firstPhase.getCmmi()>=60){
			total=total+3;
		}if(firstPhase.getVss()>=60){
			total=total+3;
		}if(firstPhase.getWord()==1){
			total=total+3;
		}if(firstPhase.getExcel()==1){
			total=total+3;
		}if(firstPhase.getPpt()==1){
			total=total+3;
		}if(firstPhase.getYanjiang()==1){
			total=total+3;
		}
		total=total+20-firstPhase.getQingjia()*2;//减去请假的分数
		int num=0;
		num=firstPhase.getGood()+firstPhase.getDiyiming()*2;
		if(num>30){total=total+30;}
		else{total=total+num;}
		if(firstPhase.getExam()>=60){total=total+5;}
		firstPhase.setTotal(total);
	}

}
